<?php

use yii\helpers\Html;
use yii\bootstrap\ActiveForm;
use common\widgets\ajaxbtn\AjaxBtn;

/* @var $this yii\web\View */
/* @var $model common\models\Tag */
/* @var $form yii\bootstrap\ActiveForm */

?>

<div class="tag-form">

    <?php $form = ActiveForm::begin(); ?>

    <?php echo $form->errorSummary($model); ?>

    <?php echo $form->field($model, 'name')->textInput(['maxlength' => true]) ?>
    
    <?php echo $form->field($model, 'pinyin')->textInput(['maxlength' => true]) ?>

    <div class="form-group">
    	<?php echo getReferUrlBtn(); ?>
        <?php echo AjaxBtn::widget(['btnclass'=>$model->isNewRecord ? 'btn btn-success' : 'btn btn-primary','label'=>$model->isNewRecord ? '新增' : '修改','autosubmit'=>false])?>
    </div>

    <?php ActiveForm::end(); ?>

</div>
